## JORGE FERNANDO GOMEZ
## 1259371
## 189631
## LEC A1
## MARTIN MÜLLER
## D02
## YANG LIU


draw2: draw2.o util.o read.o process.o figStack.o memwatch.o
	gcc -o draw2 draw2.o process.o read.o figStack.o util.o memwatch.o -lm

draw2.o: draw2.c process.h read.h figStack.h memwatch.h 
	gcc -g -DMEMWATCH -DMW_STDIO -Wall -std=c99 -c draw2.c

process.o: process.c process.h util.h memwatch.h
	gcc -g -DMEMWATCH -DMW_STDIO -Wall -std=c99 -c process.c

read.o: read.c read.h util.h memwatch.h
	gcc -g -DMEMWATCH -DMW_STDIO -Wall -std=c99 -c read.c

util.o: util.c util.h memwatch.h
	gcc -g -DMEMWATCH -DMW_STDIO -Wall -std=c99 -c util.c

figStack.o: figStack.c figStack.h util.h memwatch.h
	gcc -g -DMEMWATCH -DMW_STDIO -Wall -std=c99 -c figStack.c



.PHONY: clean tar

clean:
	-rm *.o core  draw2.core draw2

tar:
	tar cvf submit.tar \
		draw2.c \
		process.c process.h \
		read.c read.h \
		util.c util.h \
		figStack.c figStack.h \
		*test* *input* \
		Makefile \
		README
